Source File
override.go
Belonging Package
github.com/K-Phoen/grabana/graph/series
package seriesimport ()// OverrideOption represents an option that can be used alter a graph panel series.type OverrideOption func(series *sdk.SeriesOverride) error// Alias defines an alias/regex used to identify the series to override.func ( string) OverrideOption {return func( *sdk.SeriesOverride) error {.Alias =return nil}}// Color overrides the color for the matched series.func ( string) OverrideOption {return func( *sdk.SeriesOverride) error {.Color = &return nil}}// Dashes enables/disables display of the series using dashes instead of lines.func ( bool) OverrideOption {return func( *sdk.SeriesOverride) error {.Dashes = &return nil}}// Lines enables/disables display of the series using dashes instead of dashes.func ( bool) OverrideOption {return func( *sdk.SeriesOverride) error {.Lines = &return nil}}func ( int) OverrideOption {return func( *sdk.SeriesOverride) error {if < 0 || > 10 {return fmt.Errorf("fill must be between 0 and 10: %w", errors.ErrInvalidArgument)}.Fill = &return nil}}func ( int) OverrideOption {return func( *sdk.SeriesOverride) error {if < 0 || > 10 {return fmt.Errorf("line width must be between 0 and 10: %w", errors.ErrInvalidArgument)}.LineWidth = &return nil}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |